import request from '@/utils/request'

// 查询会员预约列表
export function listReservation(query) {
  return request({
    url: '/mahjong/reservation/list',
    method: 'get',
    params: query
  })
}
// 查询会员充值排行
export function rechargeRanking(query) {
  return request({
    url: '/mahjong/record/rechargeRanking',
    method: 'get',
    params: query
  })
}
export function listalluser() {
  return request({
    url: '/mahjong/reservation/listalluser',
    method: 'get'
  })
}
// 查询会员预约详细
export function getReservation(id) {
  return request({
    url: '/mahjong/reservation/' + id,
    method: 'get'
  })
}

// 新增会员预约
export function addReservation(data) {
  return request({
    url: '/mahjong/reservation',
    method: 'post',
    data: data
  })
}

// 修改会员预约
export function updateReservation(data) {
  return request({
    url: '/mahjong/reservation',
    method: 'put',
    data: data
  })
}

// 删除会员预约
export function delReservation(id) {
  return request({
    url: '/mahjong/reservation/' + id,
    method: 'delete'
  })
}

// 导出会员预约
export function exportReservation(query) {
  return request({
    url: '/mahjong/reservation/export',
    method: 'get',
    params: query
  })
}
